﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Security.Principal;

namespace SimpleUnitity.Web
{
    [Serializable]
    public class SessionPrincipal : IPrincipal
    {
        private readonly IIdentity identity;

        public SessionPrincipal(WarpSession session)
        {
            identity = new SessionIdentity(session);
        }

        public IIdentity Identity
        {
            get { return identity; }
        }

        public bool IsInRole(string role)
        {
            return false;
        }
    }
}